cmake_minimum_required(VERSION 3.5)
project(HAWK_CAM)
set(CMAKE_CXX_STANDARD 14)

set(SrcDir "" CACHE INTERNAL "src dir" )
set(IncDir "" CACHE INTERNAL "include dir" )


add_subdirectory(${PROJECT_SOURCE_DIR}/ALGO)
add_subdirectory(${PROJECT_SOURCE_DIR}/ALGO/IVE)
add_subdirectory(${PROJECT_SOURCE_DIR}/CAM_SENSOR)



set( IVE_SAMPLE_DIR ${CMAKE_SOURCE_DIR}/../sample)
add_subdirectory( ${IVE_SAMPLE_DIR}/ ive_sample.out)

set( TIEMFUN_DIR ${CMAKE_SOURCE_DIR}/../time_fun)
add_subdirectory( ${TIEMFUN_DIR}/ TIEMFUN_DIR.out)

set( MPP_SAMPLE_COMMON_DIR ${PROJECT_SOURCE_DIR}/../../../../sample/common )
add_subdirectory( ${MPP_SAMPLE_COMMON_DIR}/   MPP_SAMPLE_COMMON_DIR.out )
#add_subdirectory( ${MPP_SAMPLE_COMMON_DIR}/   EXCLUDE_FROM_ALL ${MPP_SAMPLE_COMMON_DIR}/sample_comm_audio.c )

set( SVP_COMMON_DIR ${PROJECT_SOURCE_DIR}/../../common/)
add_subdirectory( ${SVP_COMMON_DIR}/ SVP_COMMON_DIR.out)




include_directories(
        ${CMAKE_SOURCE_DIR}/../sample/include
        ${CMAKE_SOURCE_DIR}/../time_fun/include
        ${PROJECT_SOURCE_DIR}/../../../../sample/common
        ${PROJECT_SOURCE_DIR}/../../common/
        ${PROJECT_SOURCE_DIR}/../../../../include
        ${IncDir}
)
message(STATUS "*****${CMAKE_CXX_COMPILER}\n")
message(STATUS " ${IVE_SAMPLE_DIR}\n")
message(status,"total ${SrcDir}\n")
message(status,"total ${IncDir}\n")


#set(SENSOR0_TYPE 0)
#add_definitions(-D MOCK)
add_definitions(-D HAWK_CAM)
#总算了解 __cplusplus，cpp文件中这个宏定义是自动开启的
#add_definitions(-D __cplusplus)
add_executable(HAWK_CAM  main.cpp  ${SrcDir} )
#include_directories( ${PROJECT_SOURCE_DIR}/../../../../lib)
set(LIB_DIR ${PROJECT_SOURCE_DIR}/../../../../lib )
#link_directories(${PROJECT_SOURCE_DIR}/../../../../lib/libmpi.a)

target_link_libraries(HAWK_CAM pthread -ldl ${LIB_DIR}/libmpi.a ${LIB_DIR}/libsecurec.a
        ${LIB_DIR}/libupvqe.a
        ${LIB_DIR}/libdnvqe.a
        ${LIB_DIR}/libVoiceEngine.a

        ${LIB_DIR}/libhdmi.a
        ${LIB_DIR}/libdsp.a

        ${LIB_DIR}/libsns_imx290.a
        ${LIB_DIR}/libsns_imx290_slave.a
        ${LIB_DIR}/libsns_imx307.a
        ${LIB_DIR}/libsns_imx334.a


        ${LIB_DIR}/libisp.a
        ${LIB_DIR}/lib_hiae.a
        ${LIB_DIR}/lib_hiawb.a

        ${LIB_DIR}/lib_hildci.a
        ${LIB_DIR}/lib_hidrc.a
        ${LIB_DIR}/lib_hidehaze.a

        ${LIB_DIR}/libive.a
        ${LIB_DIR}/libmd.a
        ${LIB_DIR}/libnnie.a
    )